shadowsocks-libev: fix validation of list option
authorYousong Zhou <[email protected]>
Tue, 29 Aug 2017 03:19:02 +0000 (11:19 +0800)
committerYousong Zhou <[email protected]>
Wed, 30 Aug 2017 02:13:29 +0000 (10:13 +0800)
ubox 'list' type is for validating multiple elements separated by
tabs/whitespaces in a single value.  E.g. The following should not be
accepted

    list src_ip_bypass '1.2.3.4 4.3.2.1'

Signed-off-by: Yousong Zhou <[email protected]>
net/shadowsocks-libev/Makefile
net/shadowsocks-libev/files/shadowsocks-libev.init

index 1b49b4991b73b0315beb8b98fd66486497a26180..969868f07cef7cbd28c6b4fcc6e4c8267b98cdfa 100644 (file)
@@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk
 #
 PKG_NAME:=shadowsocks-libev
 PKG_VERSION:=3.0.8
-PKG_RELEASE:=8
+PKG_RELEASE:=9
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
index 4226600d96fb40981541720cad3440268f19a785..dbd64a707a59cfd9d2846e1d6578d1f672fafa3c 100644 (file)
@@ -287,18 +287,18 @@ validate_ss_rules_section() {
                'disabled:bool:0' \
                'redir_tcp:uci("shadowsocks-libev", "@ss_redir")' \
                'redir_udp:uci("shadowsocks-libev", "@ss_redir")' \
-               'src_ips_bypass:list(or(ip4addr,cidr4))' \
-               'src_ips_forward:list(or(ip4addr,cidr4))' \
-               'src_ips_checkdst:list(or(ip4addr,cidr4))' \
+               'src_ips_bypass:or(ip4addr,cidr4)' \
+               'src_ips_forward:or(ip4addr,cidr4)' \
+               'src_ips_checkdst:or(ip4addr,cidr4)' \
                'dst_ips_bypass_file:file' \
-               'dst_ips_bypass:list(or(ip4addr,cidr4))' \
+               'dst_ips_bypass:or(ip4addr,cidr4)' \
                'dst_ips_forward_file:file' \
-               'dst_ips_forward:list(or(ip4addr,cidr4))' \
+               'dst_ips_forward:or(ip4addr,cidr4)' \
                'src_default:or("bypass", "forward", "checkdst"):checkdst' \
                'dst_default:or("bypass", "forward"):bypass' \
                'local_default:or("bypass", "forward", "checkdst"):bypass' \
                'dst_forward_recentrst:bool:0' \
-               'ifnames:list(maxlength(15))' \
+               'ifnames:maxlength(15)' \
                'ipt_args:string'
 }